import re

__author__ = 'deadmoroz'

def langRe(language, pattern):
    flags = re.M
    if language.caseInsensitive:
        flags |= re.I

    return re.compile(pattern, flags)
